//
//  MKUILedBannerVerticalView.h
//  MKUI
//  垂直方向滚动的跑马灯控件
//  Created by 苏尚进 on 2021/12/29.
//  Copyright © 2021 moon. All rights reserved.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@class MKUILedBannerVerticalView;
@protocol MKUILedBannerVerticalViewDelegate <NSObject>
@optional
- (void)ledBannerVerticalView:(MKUILedBannerVerticalView *)view didScrollToBannerWithIndex:(NSInteger)currentIndex;//滚动到显示某一项
- (void)ledBannerVerticalView:(MKUILedBannerVerticalView *)view didClickBannerWithIndex:(NSInteger)currentIndex bannerContent:(NSObject *)content;//点击了某一项
- (Class)ledBannerVerticalView:(MKUILedBannerVerticalView *)view cellClassForBannerContent:(NSObject *)content;//定制指定数据的显示视图，要求为MKUICollectionViewCellBase子类
@end

@interface MKUILedBannerVerticalView : UIView
@property(nonatomic,weak,nullable) id<MKUILedBannerVerticalViewDelegate> delegate;
@property(nonatomic,strong) NSArray<NSObject *> *contents;//被展示的数据
@property(nonatomic,assign,nullable) Class defaultContentCellClass;//默认的被展示数据显示视图，要求为MKUICollectionViewCellBase子类
- (void)reloadData;//刷新数据
@property(nonatomic,assign) NSInteger currentIndex;
- (void)setCurrentIndex:(NSInteger)currentIndex animated:(BOOL)animated;
- (void)setCurrentIndexWithDistance:(NSInteger)distance animated:(BOOL)animated;
#pragma mark - 定时滚动
@property(nonatomic,readonly) BOOL isAutoScrolling;
- (void)startAutoScrollingWithDistance:(NSInteger)distance duration:(NSTimeInterval)duration;
- (void)stopAutoScrolling;
@end

NS_ASSUME_NONNULL_END

